<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>ByTSS - Gestor SUCE</title>

    <script type="text/javascript" src="ext/ext-all-debug.js"></script>
    <link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
    <script type="text/javascript" src="ext/ext-lang-es.js"></script>
    <script type="text/javascript" src="ext/extlib.js"></script>

    <script type="text/javascript">


        Ext.onReady(init);

        function getParameters() {
            var result = {},
                params = window.location.href.split('#');

            if (params.length > 1) {
                return Ext.urlDecode(params[1]);
            }
            return result;
        }

        function init() {
            var params = getParameters(),
                f,
                vista = [];
            for(var i=1; i <= 4; i++){
                f = params['f' + i];
                if(f){
                    vista.push(new Ext.ux.IFrame({
                        flex: 1,
                        src: 'download.ashx?' + Ext.urlEncode({folder: params.numesolicitud, file: f})
                    }));
                }
            }


            Ext.create('Ext.container.Viewport', {
                layout: 'border',
                renderTo: Ext.getBody(),
                items: [{
                    region: 'north',
                    baseCls: 'x-plain',
                    html: '<h1 class="x-panel-header">Visor de Documentos</h1>',
                    autoHeight: true,
                    border: false,
                    margins: '0 0 5 0'
                }, {
                    region: 'center',
                    layout: {
                        type: 'hbox',
                        align: 'stretch'
                    },
                    items: vista
                }]
            });
        }

    </script>

</head>
<body>
    
</body>
</html>
